with currency;
use currency;
with ada.text_io;

procedure test_cur is
    
    package t_io renames ada.text_io;

    pos1, pos2, pos3 : dollar;
    neg1, neg2, neg3 : dollar;
   
begin

    pos1 := float_to_dollar ( 5.50);
    pos2 := float_to_dollar ( 6.30);
    pos3 := float_to_dollar (10.00);

    neg1 := float_to_dollar (-5.45);
    neg2 := float_to_dollar (-8.99);
    neg3 := float_to_dollar (-15.00);

    print(add(pos1, pos2));
    t_io.new_line;
    print(add(pos2, pos3));
    t_io.new_line;
    print(add(pos1, neg1));
    t_io.new_line;
    print(add(neg1, pos1));
    t_io.new_line;
    print(add(neg2, neg3));
    t_io.new_line;
    print(subtract(pos2, pos1));
    t_io.new_line;
    print(subtract(pos1, pos2));
    t_io.new_line;
    print(subtract(pos1, neg1));
    t_io.new_line;
    print(subtract(neg1, pos1));
    t_io.new_line;
    print(subtract(neg1, neg2));
    t_io.new_line;
    print(subtract(neg3, neg2));
    t_io.new_line;
    t_io.new_line;

    print(pos1);
    t_io.new_line;
    print(pos2);
    t_io.new_line;
    print(pos3);
    t_io.new_line;
    print(neg1);
    t_io.new_line;
    print(neg2);
    t_io.new_line;
    print(neg3);

    

end test_cur;
